#ifndef BOOKDATA_H
#define BOOKDATA_H

#include <QObject>
#include <QVector>
#include <QFile>
#include <QFileInfo>
#include <QCoreApplication>
#include <QDateTime>
#include "util.h"
#include "qzip.h"

class BookData : public QObject
{
public:
    BookData();
    ~BookData(){delete contents;}
    BookData(const QString &file);
    void loadFromFile(const QString &file);
    QVector<QString>* getContents();
    QVector<QString>* getIndexes(){ return indexes;}
    void addCover();
private:
    void loadFromZipFile(const QString &file);
    QVector<QString>*  indexes;
    QVector<QString>*  contents;
    QString fileName;
};

#endif // BOOKDATA_H
